package com.example.demo.intf;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.example.demo.bean.Result;
import com.example.demo.entity.LoginUser;
import com.example.demo.entity.User;
import com.example.demo.exception.SPIPException;

/**
 * @author 88377761
 *
 */
@FeignClient(value = "user-admin")
public interface LoginInterface {
	@PostMapping(value = "/login/login")
	public Result login(User user) throws SPIPException;

	@PostMapping(value = "/login/loginForApp")
	public Result loginForApp(@RequestBody LoginUser user) throws SPIPException;

	/**
	 * 用户注册
	 * 
	 * @param user
	 * @return
	 * @throws SPIPException
	 */
	@PostMapping(value = "/login/register")
	public Result register(@RequestBody LoginUser user) throws SPIPException;

	/**
	 * 获取手机验证码
	 * 
	 * @param user
	 * @return
	 * @throws SPIPException
	 */
	@PostMapping(value = "/login/checking")
	public Result checking(@RequestBody LoginUser user) throws SPIPException;

	/**
	 * 重置密码
	 * 
	 * @param user
	 * @return
	 * @throws SPIPException
	 */
	@PostMapping(value = "/login/retrieve")
	public Result retrieve(@RequestBody LoginUser user) throws SPIPException;
}
